
import unittest
from appium import webdriver
from appium.options.android import UiAutomator2Options


class OpenApp:
    def __init__(self, capabilities):
        self.appium_server_url = 'http://127.0.0.1:4723'
        self.driver = webdriver.Remote(self.appium_server_url,
                                       options=UiAutomator2Options().load_capabilities(capabilities))

    def start(self):
        return self.driver



if __name__ == '__main__':
    unittest.main()